<?php

namespace App\Abstract;

use Psr\Log\LoggerInterface;
use Hyperf\Logger\LoggerFactory;
use Hyperf\Context\ApplicationContext;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Contract\ResponseInterface;

abstract class Exception extends \Hyperf\ExceptionHandler\ExceptionHandler
{

    protected LoggerInterface $logger;

    /**
     * @param RequestInterface $request
     * @param ResponseInterface $response
     */
    public function __construct(protected RequestInterface $request, protected ResponseInterface $response)
    {

    }

    protected function setLogger(string $logGroupName)
    {
        $this->logger = ApplicationContext::getContainer()->get(LoggerFactory::class)->get('log', $logGroupName);
    }

}